package com.yuwei.goods_detail

import com.yuwei.common.BaseApiService
import com.yuwei.common.entity.Res
import com.yuwei.goods_detail.entity.CommentUserEntity
import com.yuwei.goods_detail.entity.GoodsCarBody
import kotlinx.coroutines.flow.Flow
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query


interface GoodsDetailApiService: BaseApiService {
    //添加购物车
    @POST("/goods/addCar")
    fun goodsAddCar(@Body goodsCarBody: GoodsCarBody): Flow<Res<String>>
    //获取评论
    @GET("/comment/getCommentByUserId")
    fun getComment(@Query("datatype")datatype:Int,@Query("itemid")itemid:String):Flow<Res<CommentUserEntity>>
}